package pacs_server

import (
	"github.com/gohouse/gorose/v2"
	_ "github.com/mattn/go-sqlite3"
)

var engin *gorose.Engin

func LoadDbFile(dbfile string) (err error) {
	engin, err = gorose.Open(&gorose.Config{
		Driver: "sqlite3",
		Dsn:    dbfile,
	})
	return err
}

func DB() gorose.IOrm {
	return engin.NewOrm()
}
